package com.sh.bean;

public class Phone {
    private String model;
    private double price;
    private Camera camera;

    public Phone() {}

    public Phone(String model, double price) {
        this.model = model;
        this.price = price;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Camera getCamera() {
        return camera;
    }

    public void setCamera(Camera camera) {
        this.camera = camera;
    }

    public void useCamera() {
        System.out.println("📱 " + model + " 手机使用相机：");
        camera.takePhoto();
    }
}
